package models

import "gorm.io/gorm"

// 用户表
type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(255)"`
}

// 用户表-角色表
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int(11)"`
	Rid int `gorm:"type:int(11)"`
}

// 角色表
type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

// 角色-权限表
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int(11)"`
	Nid int `gorm:"type:int(11)"`
}

// 权限表
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

// 物流企业表
type Comp struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

// 快递类型表
type Express struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

// 快递单号表
type Order struct {
	gorm.Model
	OrderNo string `gorm:"type:varchar(20)"`
	Cid     int    `gorm:"type:int(11)"`
	Eid     int    `gorm:"type:int(11)"`
}

type OrderListData struct {
	OrderNo string `json:"order_no"`
	Cid     int    `json:"cid"`
	Cname   string `json:"c_name"`
	Eid     int    `json:"eid"`
	Ename   string `json:"e_name"`
}
